package com.probox.common.entity.vo.WeCom;


import cn.hutool.core.util.ObjectUtil;
import com.probox.common.core.enums.BuyTypeEnum;
import com.probox.common.core.text.Convert;
import com.probox.common.core.utils.money.MoneyUtils;
import lombok.Data;

import java.io.Serializable;

/**
 * 服务列表详情vo
 */
@Data
public class WeComAppointmentItemVo implements Serializable {

    /**
     * 购买类型
     */
    private String buyType;

    public String getBuyTypeStr(){
        return BuyTypeEnum.getNameByKey(getBuyType());
    }

    private String cardName;

    private String skuName;

    /**
     * 详情id
     */
    private Long detailId;

    /***
     * 项目名称
     */
    private String itemName;

    /**
     * 次数
     */
    private String times;

    /**
     * 是否是叠叠乐
     */
    private String isDdl;

    public Integer getIsDdlInt(){
        return Convert.toInt(isDdl);
    }

    /**
     * 是否是主项目
     */
    private String isMaster;

    public Integer getIsMasterInt(){
        return Convert.toInt(isMaster);
    }

    /**
     * 普通时间
     */
    private Long itemServiceDuration;

    /**
     * 叠加时间
     */
    private Long itemComposeDuration;

    private Long settlementPrice;

    private Long price;

    public String getSettlementPriceStr() {
        if (ObjectUtil.isEmpty(settlementPrice)) {
            return "";
        }
        return MoneyUtils.changeF2Y(settlementPrice);
    }

    public String getPriceStr() {
        if (ObjectUtil.isEmpty(price)) {
            return "";
        }
        return MoneyUtils.changeF2Y(price);
    }

    /**
     * 是否有特殊属性
     */
    private boolean attribute;

    private Long serviceId;


    private String nickName;

    private String cleansingName;

    private String matchingName;

    private String serviceImage;

    private String dataStatus;
    private Long technicianId;
    private Long matchingId;
    private Long cleansingId;


    private String orderNo;

    private String voucherImg;

}
